<template>
  <div class="nav-box">
<van-grid :border="false" :column-num="3">
  <van-grid-item v-for="item in navimg" :key="item.id">
    <van-image
      :src="item.img1"
      class="img"
      @click="toPage"
    />
     <p class="text">{{item.title}}</p>
  </van-grid-item>
 
</van-grid>
  </div>
</template>

<script lang="ts" setup>

import {ref} from 'vue'
import {getNavImg} from  '@/api/home'
import {useRouter} from 'vue-router'
const $router = useRouter()

let navimg:any = ref("")


const toPage:void = ()=>{
    $router.push('/leadingEnterprise')
}
getNavImg()
.then(res=>{
    navimg.value = res
})

</script>
<style  scoped>
.nav-box{
    height: 288px;
    width: 100%;
}
.img{
    width: 60px;
    height: 60px;
}
.text{
    font-size: 4.8px;
    color: gray;

}
</style>